package com.kaoqin.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.kaoqin.mapper.SysLogMapper;
import com.kaoqin.model.SysLog;
import com.kaoqin.service.SysLogService;

@Service("sysLogService")
@Transactional
public class SysLogServiceImpl implements SysLogService {
	@Autowired
	private SysLogMapper mapper;
	
	@Override
	public int insertOne(SysLog sysLog) {
		return mapper.insertOne(sysLog);
	}

	@Override
	public PageInfo<SysLog> findAll(SysLog sysLog) {
		PageHelper.startPage(sysLog.getPageNum(), sysLog.getPageSize());
		List<SysLog> findAll = mapper.findAll(sysLog);
		PageInfo<SysLog> page = new PageInfo<SysLog>(findAll);
		return page;
	}

}
